package com.yicong.ants.bean.video;

import com.yicong.ants.R;

import java.util.List;



/**
 * @author ganhuanhui
 * 时间：2019/12/11 0011
 * 描述：
 */

public class CommitL1 {

    List<CommitL2> children;

    /**
     * comment_id : 17
     * nickname : 阿浩
     * avatar : http://ant.qiniu.yblylm.com/uploads/20210321/6027491feba7317c491c9ab39905dc47.jpg
     * content : ((≡ຶ̑ꀬ≡ຶ̑))
     * like : 0
     * reply : 1
     * created_at : 2021-04-28 16:14:59
     * is_like : false
     */

    String comment_id;
    String nickname;
    String avatar;
    String content;
    int like;
    int reply;
    String created_at;
    boolean is_like;
    int like_drawable;

    public CommitL1() {
    }

    public int getLike_drawable() {
        return is_like ? R.drawable.video_common_like : R.drawable.video_common_unlike;
    }

    public List<CommitL2> getChildren() {
        return this.children;
    }

    public String getComment_id() {
        return this.comment_id;
    }

    public String getNickname() {
        return this.nickname;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public String getContent() {
        return this.content;
    }

    public int getLike() {
        return this.like;
    }

    public int getReply() {
        return this.reply;
    }

    public String getCreated_at() {
        return this.created_at;
    }

    public boolean is_like() {
        return this.is_like;
    }

    public CommitL1 setChildren(List<CommitL2> children) {
        this.children = children;
        return this;
    }

    public CommitL1 setComment_id(String comment_id) {
        this.comment_id = comment_id;
        return this;
    }

    public CommitL1 setNickname(String nickname) {
        this.nickname = nickname;
        return this;
    }

    public CommitL1 setAvatar(String avatar) {
        this.avatar = avatar;
        return this;
    }

    public CommitL1 setContent(String content) {
        this.content = content;
        return this;
    }

    public CommitL1 setLike(int like) {
        this.like = like;
        return this;
    }

    public CommitL1 setReply(int reply) {
        this.reply = reply;
        return this;
    }

    public CommitL1 setCreated_at(String created_at) {
        this.created_at = created_at;
        return this;
    }

    public CommitL1 set_like(boolean is_like) {
        this.is_like = is_like;
        return this;
    }

    public CommitL1 setLike_drawable(int like_drawable) {
        this.like_drawable = like_drawable;
        return this;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof CommitL1)) return false;
        final CommitL1 other = (CommitL1) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$children = this.getChildren();
        final Object other$children = other.getChildren();
        if (this$children == null ? other$children != null : !this$children.equals(other$children))
            return false;
        final Object this$comment_id = this.getComment_id();
        final Object other$comment_id = other.getComment_id();
        if (this$comment_id == null ? other$comment_id != null : !this$comment_id.equals(other$comment_id))
            return false;
        final Object this$nickname = this.getNickname();
        final Object other$nickname = other.getNickname();
        if (this$nickname == null ? other$nickname != null : !this$nickname.equals(other$nickname))
            return false;
        final Object this$avatar = this.getAvatar();
        final Object other$avatar = other.getAvatar();
        if (this$avatar == null ? other$avatar != null : !this$avatar.equals(other$avatar))
            return false;
        final Object this$content = this.getContent();
        final Object other$content = other.getContent();
        if (this$content == null ? other$content != null : !this$content.equals(other$content))
            return false;
        if (this.getLike() != other.getLike()) return false;
        if (this.getReply() != other.getReply()) return false;
        final Object this$created_at = this.getCreated_at();
        final Object other$created_at = other.getCreated_at();
        if (this$created_at == null ? other$created_at != null : !this$created_at.equals(other$created_at))
            return false;
        if (this.is_like() != other.is_like()) return false;
        if (this.getLike_drawable() != other.getLike_drawable()) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof CommitL1;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $children = this.getChildren();
        result = result * PRIME + ($children == null ? 43 : $children.hashCode());
        final Object $comment_id = this.getComment_id();
        result = result * PRIME + ($comment_id == null ? 43 : $comment_id.hashCode());
        final Object $nickname = this.getNickname();
        result = result * PRIME + ($nickname == null ? 43 : $nickname.hashCode());
        final Object $avatar = this.getAvatar();
        result = result * PRIME + ($avatar == null ? 43 : $avatar.hashCode());
        final Object $content = this.getContent();
        result = result * PRIME + ($content == null ? 43 : $content.hashCode());
        result = result * PRIME + this.getLike();
        result = result * PRIME + this.getReply();
        final Object $created_at = this.getCreated_at();
        result = result * PRIME + ($created_at == null ? 43 : $created_at.hashCode());
        result = result * PRIME + (this.is_like() ? 79 : 97);
        result = result * PRIME + this.getLike_drawable();
        return result;
    }

    public String toString() {
        return "CommitL1(children=" + this.getChildren() + ", comment_id=" + this.getComment_id() + ", nickname=" + this.getNickname() + ", avatar=" + this.getAvatar() + ", content=" + this.getContent() + ", like=" + this.getLike() + ", reply=" + this.getReply() + ", created_at=" + this.getCreated_at() + ", is_like=" + this.is_like() + ", like_drawable=" + this.getLike_drawable() + ")";
    }
}
